﻿@{
    ViewBag.Title = "Index";
}
@model HotelMgr.ViewModels.VMOrderRoomList
@using Telerik.Web.Mvc.UI;

<style type="text/css">
    #roomList{ overflow: hidden;}
    #roomList .roomBox { width: 90px;border: 1px solid black;padding: 2px;position: relative;}
    #roomList .roomBox p.title{ font-size: 14px;}
    #roomList .roomBox .room-detail{ display: none;position: absolute;left: 110px;top: 2px;z-index: 10;width: 100px;background: papayawhip;border: 1px solid black;}
    #roomList .roomBox:hover{ background: lemonchiffon;}
    #roomList .roomBox:hover .room-detail{ display: block;}
    input.txtPrice{ width: 30px;}
    .currentPrice{ width: 60px;}
    #roomList .state1{background:yellowgreen;}
    #roomList .state2{ background: lightgoldenrodyellow; }
    #roomList .state3{ background: indianred; }
</style>
@using (Html.BeginForm("Index", "RoomSearch", FormMethod.Post, new { id = "indexForm" }))
{
    <div id="roomSearch">
        <div class="type">
            类型：
            @foreach (var type in Model.RoomTypes)
            {
                <input type="checkbox" name="roomTypeFilter" id="@("type" + type.RoomTypeID)" checked="checked" value="@type.RoomTypeID"/>
                <label for="@("type" + type.RoomTypeID)">@type.TypeName</label>
            }
        </div>
        <div class="status"> 
            状态：
            @foreach (var state in Model.RoomStates)
            {
                <input type="checkbox" value="@state.RoomStateID" name="roomStateFilter" checked="checked" id="@("state" + state.RoomStateID)"/>
                <label for="@("state" + state.RoomStateID)">@state.Name</label>
            }
        </div>
        <div class="roomNum">
            房号：
            <input type="text" name="roomNum_lower" class=""/> - <input type="text" name="roomNum_upper"  class=""/>
        </div>
        <div class="price">
            价格：￥
            @{ Html.Telerik().NumericTextBox()
                       .Name("price_lower")
                       .Spinners(true)
                       .EmptyMessage("") 
                       .IncrementStep(10)
                       .MinValue(0.01)
                       .InputHtmlAttributes(new { @class = "currentPrice", style = "display:inline;" })
                   .Render(); }-@{ Html.Telerik().NumericTextBox()
                       .Name("price_upper")
                       .Spinners(true)
                       .EmptyMessage("")
                       .IncrementStep(20)
                       .MaxValue(1000)
                       .InputHtmlAttributes(new { @class = "currentPrice", style = "display:inline;" })
                       .Render(); }(元)
            <input type="submit" value="搜索"/>
        </div>
    </div>
}
<div id="room-list" class="fn-clear">
    @{Html.RenderPartial("RoomList", Model.Rooms);}
</div>